package com.hnxxxy.controller;

import com.hnxxxy.pojo.Jurisdiction;
import com.hnxxxy.service.UserOpertionservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * @author：张浩东
 * @Phone：15096207164
 * @QQ：1367048164
 * @E-mail：1367048164@qq.com
 * @date:2020-05-02 16:37
 */
@RestController
public class BackstageController {

    @Autowired
    UserOpertionservice userOpertionservice;

    /**
     * 对于登录后后台页面请求处理，也相当于页面的显示
     * @return 后台页面backstage
     */
    @RequestMapping("/back")
    @ResponseBody
    public List<Jurisdiction> back(){
        return userOpertionservice.queryUserJur();
    }

    @RequestMapping("/backstage")
    public ModelAndView backstage(){
        return new ModelAndView("backstage");
    }

    @RequestMapping("/communityList")
    public ModelAndView communityList(){
        return new ModelAndView("communityList");
    }

    @RequestMapping("/activityList")
    public ModelAndView activityList(){
        return new ModelAndView("activityList");
    }

    @RequestMapping("/addcommunity")
    public ModelAndView addcommunity(){
        return new ModelAndView("addcommunity");
    }

    @RequestMapping("/addactivity")
    public ModelAndView addactivity(){
        return new ModelAndView("addactivity");
    }

    @RequestMapping("/deskManager")
    public ModelAndView deskManager(){
        return new ModelAndView("deskManager");
    }

    @RequestMapping("/personal")
    public ModelAndView personal(){
        return new ModelAndView("personal");
    }

    @RequestMapping("/changePwd")
    public ModelAndView changePwd(){
        return new ModelAndView("changePwd");
    }

    @RequestMapping("/mycommunity")
    public ModelAndView mycommunity(){
        return new ModelAndView("mycommunity");
    }

    @RequestMapping("/caidandemo")
    public ModelAndView caidandemo(){
        return new ModelAndView("caidandemo");
    }

    @RequestMapping("/upload")
    public ModelAndView update(){
        return new ModelAndView("upload");
    }

    @RequestMapping("/applyCreateAssociation")
    public ModelAndView applyCreateAssociation(){
        return new ModelAndView("applyCreateAssociation");
    }

    @RequestMapping("/showlog")
    public ModelAndView showlog(){
        return new ModelAndView("showlog");
    }
    @RequestMapping("/log")
    public ModelAndView log(){
        return new ModelAndView("log");
    }

    @RequestMapping("/single")
    public ModelAndView single(){
        return new ModelAndView("single");
    }

    @RequestMapping("/index")
    public ModelAndView index(){
        return new ModelAndView("main");
    }



}
